﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace JTicket.UI
{
    public partial class JT_SaleAdd : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
                RegScript();
        }

        void RegScript()
        {
            if (Request.QueryString["Flag"] != null)
                ScriptManager.RegisterClientScriptBlock(this.Page,
                    this.GetType(), "RegScript", string.Format("var Flag='{0}';var ID='{1}';",
                    Request.QueryString["Flag"], Request.QueryString["ID"]), true);
            else
                ScriptManager.RegisterClientScriptBlock(this.Page,
                     this.GetType(), "RegScript", "var Flag='Add';var ID='';", true);
        }
    }
}